From: Marco Trevisan (TreviƱo) Date: Fri, 22 Aug 2025 13:08:23 +0000 (+0200) Subject: gdm/authPrompt: Fix key focus handling on choice list X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~80^2^2~23 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c90d2d7bd22b4430834102732f2deb59a8bb8ab3;p=gnome-shell.git gdm/authPrompt: Fix key focus handling on choice list When a choice list widget is prompted in GDM we call updateSensitivity() but this does not act on the currently visible authentication widget but rather on the text entry all the times. And this causes that when a choice list is shown we always set the key focus to the (hidden) text entry. This implies that when the list is finally shown, moving the arrow keys leads makes the entry context menu to be shown instead of being able to navigate through the entries. So, make updateSensitivity use the currently visible authorization widget instead and use it to control the sensitivity of the choice list Part-of: --- diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js index b9d35354f..800e2f185 100644 --- a/js/gdm/authPrompt.js +++ b/js/gdm/authPrompt.js @@ -520,13 +520,13 @@ export const AuthPrompt = GObject.registerClass({ this._authList.set({ opacity: 0, visible: true, - reactive: false, }); + this.updateSensitivity(false); this._authList.ease({ opacity: 255, duration: MESSAGE_FADE_OUT_ANIMATION_TIME, transition: Clutter.AnimationMode.EASE_OUT_QUAD, - onComplete: () => (this._authList.reactive = true), + onComplete: () => this.updateSensitivity(true), }); } @@ -593,18 +593,25 @@ export const AuthPrompt = GObject.registerClass({ } updateSensitivity(sensitive) { - if (this._entry.reactive === sensitive) + let authWidget; + + if (this._authList.visible) + authWidget = this._authList; + else + authWidget = this._entry; + + if (authWidget.reactive === sensitive) return; - this._entry.reactive = sensitive; + authWidget.reactive = sensitive; if (sensitive) { - this._entry.grab_key_focus(); + authWidget.grab_key_focus(); } else { this.grab_key_focus(); - if (this._entry === this._passwordEntry) - this._entry.password_visible = false; + if (authWidget === this._passwordEntry) + authWidget.password_visible = false; } }